package org.example.feign;

import org.example.util.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @description:
 * @author: 谢超
 * @date: 2024/11/26 15:27
 */
@FeignClient(name = "dcloud-link-service")
public interface ShortLinkFeignService {

    /**
     * 检查短链是否存在
     * @param shortLinkCode
     * @return
     */
    @GetMapping(value = "/api/link?v1/check", headers = {"rpc-token=${rpc.token}"})
    JsonData check(@RequestParam("shortLinkCode") String shortLinkCode);
}
